package com.min.main.cmd;

import com.min.license.LicenseManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import java.io.IOException;

@Component
@Order(1)
@Slf4j
public class SystemInfoRunner implements CommandLineRunner {

    @Autowired
    LicenseManager licenseManager;

    @Override
    public void run(String... args) throws IOException {
//        final long check = licenseManager.check();
//        System.out.println("许可还剩余" + check + "毫秒");
        // 可以在项目启动之前做一些操作，比如加载缓存，清空登录状态
        log.debug("{} application starting ...", this.getClass().getName());
    }

}
